package com.ruoyi;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ApplicationContext;
import org.springframework.util.StringUtils;

/**
 * 启动程序
 * 
 * @author ruoyi
 */
@Slf4j
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
public class RuoYiApplication {
    public static void main(String[] args) {
        SpringApplicationBuilder builder = new SpringApplicationBuilder(RuoYiApplication.class);
        ApplicationContext context = builder.web(WebApplicationType.SERVLET).run(args);
        String[] activeProfiles = context.getEnvironment().getActiveProfiles();
        log.info("Started successfully, ActiveProfiles = {}", StringUtils.arrayToCommaDelimitedString(activeProfiles));
    }
}